﻿using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.ComponentModel;
using System.Xml.Serialization;
using System;
using System.Drawing.Design;

namespace Common
{
    [Serializable]
    public class ModuleConfig
    {
        #region TestItems 测试项目
        List<TestItem> testItems = new List<TestItem>();
        [Category("集合"), Description("测试项目配置列表"), DisplayName("测试项目配置列表")]
        public List<TestItem> TestItems { get{return testItems;} set{ testItems = value;} }
        #endregion
        #region ReportConfigItems 报告配置
        [Category("集合"), Description("报告相关的配置"), DisplayName("报告配置")]
        public List<ReportConfigItem> ReportConfigItems { get { return reportConfigItems; } set { reportConfigItems = value; } }
        List<ReportConfigItem> reportConfigItems = new List<ReportConfigItem>();
        #endregion
        [Category("集合"), Description("字符串字典"), DisplayName("字符串字典")]
        public List<KVMapping> NameMappings { get { return nameMappings; } set { nameMappings = value; } }
        List<KVMapping> nameMappings = new List<KVMapping>();
        [Category("输出端口"), Description("上位机运行，会把该端口打开。"), DisplayName("运行")]
        public int DO_RUN { get; set; }
        [Category("输出端口"), Description("上位机数据读取完成。"), DisplayName("读取完成")]
        public int DO_READ_OK { get; set; }
        [Category("输入端口"), Description("测试完成"), DisplayName("测试完成")]
        public int DI_TEST_OVER { get; set; }
        [Category("输入端口"), Description("进入结束模式"), DisplayName("结束模式")]
        public int DI_FINNISH_MODE { get; set; }
        [Category("输出端口"), Description("上位机控制下位机停止"), DisplayName("警告")]
        public int DO_WARN { get; set; }
        [Category("Multiple"), Description("LS倍数"), DisplayName("LS倍数")]
        public int LS_Multiple { get; set; }
        [Category("Multiple"), Description("R倍数"), DisplayName("R倍数")]
        public int R_Multiple { get; set; }
        [Category("Multiple"), Description("LOVC倍数"), DisplayName("LOVC倍数")]
        public int LVOC_Multiple { get; set; }
        [Category("Multiple"), Description("SURG倍数"), DisplayName("SURG倍数")]
        public int SURG_Multiple { get; set; }
        [Category("路径"), Description("图像文件路径"), DisplayName("图像文件路径")]
        [Editor(typeof(Common.FileNameEditor), typeof(UITypeEditor))]
        public string CCD_Path { get; set; }
        [Category("路径"), Description("综测文件路径"), DisplayName("综测文件路径")]
        [Editor(typeof(Common.FileNameEditor), typeof(UITypeEditor))]
        public string ATR_Path { get; set; }

        [Category("路径"), Description("漏感1文件"), DisplayName("漏感1文件")]
        [Editor(typeof(Common.SelectFileNameEditor), typeof(UITypeEditor))]
        public string LG_Path1 { get; set; }
        [Category("路径"), Description("漏感2文件"), DisplayName("漏感2文件")]
        [Editor(typeof(Common.SelectFileNameEditor), typeof(UITypeEditor))]
        public string LG_Path2 { get; set; }
        [Category("测试类别"), Description("描述测试产品的类别"), DisplayName("Class Name")]
        public string ClassName { get; set; }
       
    }
}
